<?php

namespace App\Models;

use Dcat\Admin\Traits\HasDateTimeFormatter;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Support\Str;

class Setting extends Model
{
    use SoftDeletes;
    use HasDateTimeFormatter;

    protected $casts = [
        'options' => 'json',
    ];

    public function setVariateAttribute($value)
    {
        $this->attributes['variate'] = Str::lower($value);
    }
}
